<% if !current_user.nil?  %>
  <% if ((@user.id == current_user.id) || (current_user.role == 'admin')) %>    
    <% if (@user.id == current_user.id)
          login = 'My'
       else
          login = @user.login
       end%>
    <%= link_to 'Edit ' + login + ' Information', edit_user_path(@user) %> 
    <%= link_to 'Get an API token', {:controller => 'users', :action => 'api_key'}, {:title => 'Generate an API token.'} %> 
  <!--  
    <%= link_to 'Change ' + login + ' Password', :controller => 'users', :action => 'change_password' %>
    <%= link_to 'Delete ' + login + ' Account', :controller => 'users', :action => 'delete', :id => @user.id %> 
  -->
  <% end %>
<% end %>

<h1><%=@user.login%>'s Didily</h1>
<%= render(:partial => "shared/didily" , :collection => @user.didilies, :locals => {:include_admin => true}) %>
<br />
<%= render(:partial => "shared/formats") %>
